home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / 5Miles2Go.swf / scripts / DefineButton2_331 / BUTTONCONDACTION on(keyPress Up).as < prev   
Encoding:
Text File  |  2001-07-07  |  961 b   |  21 lines

  1. on(keyPress "<Up>"){
  2.    CountCars = "1";
  3.    while(CountCars < "5")
  4.    {
  5.       CarNum = "/car" add CountCars;
  6.       if((getProperty(CarNum, _X) + getProperty(CarNum, _width) / "2" < getProperty("/car5", _X) - getProperty("/car5", _width) / "2" or getProperty("/car5", _X) + getProperty("/car5", _width) / "2" < getProperty(CarNum, _X) - getProperty(CarNum, _width) / "2" or getProperty(CarNum, _Y) + getProperty(CarNum, _height) / "2" < getProperty("/car5", _Y) - getProperty("/car5", _height) / "2" - "6" or getProperty("/car5", _Y) < getProperty(CarNum, _Y) - getProperty(CarNum, _height) / "2") and getProperty("/car5", _Y) - "2" >= "190")
  7.       {
  8.          set("Free" add CountCars,"1");
  9.       }
  10.       else
  11.       {
  12.          set("Free" add CountCars,"0");
  13.       }
  14.       CountCars += "1";
  15.    }
  16.    if(Free1 == "1" and Free2 == "1" and Free3 == "1" and Free4 == "1")
  17.    {
  18.       setProperty("/car5", _Y, getProperty("/car5", _Y) - "2");
  19.    }
  20. }
  21.